package com.example.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.model.pojo.OperationLog;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author zhexueqi
* @description 针对表【operation_log】的数据库操作Mapper
* @createDate 2025-04-05 02:27:58
* @Entity generator.domain.OperationLog
*/
public interface OperationLogMapper extends BaseMapper<OperationLog> {


    // 查询最近i条操作记录
    @Select("SELECT * FROM operation_log WHERE user_address = #{userAddress} ORDER BY operation_time DESC LIMIT #{i}")
    List<OperationLog> selectRecentByUser(String userAddress, int i);
}
